<?php

class IndexController
{
    public function index()
    {
        $_SESSION["info"] = "这是session信息";
        setcookie("name", "这是cookie信息");
    }
    public function testView()
    {
        require_once "./app/view/test.html";
    }
    public function hello()
    {
        echo $_SESSION["info"];
        echo "<br>";
        echo $_COOKIE["name"] ?? "cookie不存在";
        // phpinfo();
    }
}

session_start();
$index = new IndexController();
// $index->index();
$index->hello();
